/**
 * 
 */

package com.chengyu.eyc.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author kevin
 *
 */
@ConfigurationProperties(ignoreInvalidFields = false, prefix = "eyc.wechat")
public class WechatProperties {

    public static class OfficialAccount {

        private String id;

        private String appId;

        private String appSecret;

        /**
         * @return the appId
         */
        public String getAppId() {
            return appId;
        }

        /**
         * @return the appSecret
         */
        public String getAppSecret() {
            return appSecret;
        }

        /**
         * @return the id
         */
        public String getId() {
            return id;
        }

        /**
         * @param appId the appId to set
         */
        public void setAppId(String appId) {
            this.appId = appId;
        }

        /**
         * @param appSecret the appSecret to set
         */
        public void setAppSecret(String appSecret) {
            this.appSecret = appSecret;
        }

        /**
         * @param id the id to set
         */
        public void setId(String id) {
            this.id = id;
        }

    }

    public static class Pay {

        private String mchId;

        /**
         * 微信支付商户密钥
         */
        private String mchKey;

        /**
         * 服务商模式下的子商户公众账号ID，普通模式请不要配置，请在配置文件中将对应项删除
         */
        private String subAppId;

        /**
         * 服务商模式下的子商户号，普通模式请不要配置，最好是请在配置文件中将对应项删除
         */
        private String subMchId;

        /**
         * apiclient_cert.p12文件的绝对路径，或者如果放在项目中，请以classpath:开头指定
         */
        private String keyPath;

        /**
         * @return the keyPath
         */
        public String getKeyPath() {
            return keyPath;
        }

        /**
         * @return the mchId
         */
        public String getMchId() {
            return mchId;
        }

        /**
         * @return the mchKey
         */
        public String getMchKey() {
            return mchKey;
        }

        /**
         * @return the subAppId
         */
        public String getSubAppId() {
            return subAppId;
        }

        /**
         * @return the subMchId
         */
        public String getSubMchId() {
            return subMchId;
        }

        /**
         * @param keyPath the keyPath to set
         */
        public void setKeyPath(String keyPath) {
            this.keyPath = keyPath;
        }

        /**
         * @param mchId the mchId to set
         */
        public void setMchId(String mchId) {
            this.mchId = mchId;
        }

        /**
         * @param mchKey the mchKey to set
         */
        public void setMchKey(String mchKey) {
            this.mchKey = mchKey;
        }

        /**
         * @param subAppId the subAppId to set
         */
        public void setSubAppId(String subAppId) {
            this.subAppId = subAppId;
        }

        /**
         * @param subMchId the subMchId to set
         */
        public void setSubMchId(String subMchId) {
            this.subMchId = subMchId;
        }

    }

    public static class RefundMessage {

        private String templateId;

        /**
         * @return the templateId
         */
        public String getTemplateId() {
            return templateId;
        }

        /**
         * @param templateId the templateId to set
         */
        public void setTemplateId(String templateId) {
            this.templateId = templateId;
        }

    }

    public static class RejectRefundMessage extends RefundMessage{
        
    }

    public static class SubcribeMessage {

        private String templateId;

        /**
         * @return the templateId
         */
        public String getTemplateId() {
            return templateId;
        }

        /**
         * @param templateId the templateId to set
         */
        public void setTemplateId(String templateId) {
            this.templateId = templateId;
        }

    }

    private String appId;

    private String appSecret;

    private final Pay pay = new Pay();

    private final SubcribeMessage subcribeMessage = new SubcribeMessage();

    private final RefundMessage refundMessage = new RefundMessage();

    private final RejectRefundMessage rejectRefundMessage=new RejectRefundMessage();

    private final OfficialAccount officialAccount = new OfficialAccount();

    /**
     * @return the appId
     */
    public String getAppId() {
        return appId;
    }

    /**
     * @return the appSecret
     */
    public String getAppSecret() {
        return appSecret;
    }

    /**
     * @return the officialAccount
     */
    public OfficialAccount getOfficialAccount() {
        return officialAccount;
    }
    /**
     * @return the pay
     */
    public Pay getPay() {
        return pay;
    }
    
    /**
     * @return the refundMessage
     */
    public RefundMessage getRefundMessage() {
        return refundMessage;
    }

    /**
     * @return the rejectRefundMessage
     */
    public RejectRefundMessage getRejectRefundMessage() {
        return rejectRefundMessage;
    }

    /**
     * @return the subcribeMessage
     */
    public SubcribeMessage getSubcribeMessage() {
        return subcribeMessage;
    }

    /**
     * @param appId the appId to set
     */
    public void setAppId(String appId) {
        this.appId = appId;
    }

    
    /**
     * @param appSecret the appSecret to set
     */
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

}
